package usb;

import java.io.File;

/**
 * @author spencercjh
 */
public class DecryptPrepare {

    public static String init() {
        DiskSearchThread thread = new DiskSearchThread(true);
        thread.run();
        /*等到10秒让线程去找相关文件*/
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        File newDevice = DiskSearchThread.newDevice;
        if (newDevice != null) {
            return String.valueOf(DiskSearchThread.newDevice);
        } else {
            return "error";
        }
//        return SearchFileThread.find;
    }

    public static void main(String[] args) {
        if (!"error".equals(init())) {
            System.out.println("#");
        } else {
            System.out.println("!");
        }
    }
}
